<script lang="ts" setup>
import Container from '../components/Container.vue';

const pwaList = reactive([
  { title: 'Open in Safari', text: 'If you are in any other browser, open this page in the Safari browser' },
  { title: 'Click "Share"', text: 'Tap on the "Share" icon in the menu at the bottom of the screen. A dialog box will open.' },
  { title: 'Click "Go to Home Screen"', text: 'Tap on the item "On the Home screen", and click "Finish"' },
]);
</script>

<template>
  <Container>
    <div class="mb-5 text-6 text-white font-700 leading-5.5">
      iOS instruction
    </div>
    <div class="grid gap-3.75">
      <div v-for="(item, index) in pwaList" :key="index" class="pwa-instruction-step">
        <div class="pwa-instruction-step-count" /><div>
          <div>
            <div class="relative m-[4px_0_8px] text-3.5 text-white font-600">
              {{ item.title }}
            </div>
            <div class="text-3 text-#c4cfed leading-5.2">
              {{ item.text }}
            </div>
          </div>
        </div>
      </div>
      <video
        class="mx-auto block max-w-180 w-full rounded-3" autoplay muted="true" loop preload="auto" playsinline
        :src="$store.app.joinCdnPath('/game/tutorials/appinfo.mp4')"
      />
    </div>
  </Container>
</template>

<style lang="scss" scoped>
.pwa-instruction-step {
  display: flex;
  counter-increment: steps;
}
.pwa-instruction-step-count {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  background-image: linear-gradient(45deg, #0095ff, #0855c4);
  color: #fff;
  margin-right: 10px;
  flex-shrink: 0;
  &::before {
    content: counters(steps, '.');
  }
}
</style>
